package login;

import java.time.LocalDate;
import java.time.LocalTime;

public class vegetableList {


    private String dId;
    private String dame;
    private String dType;//菜品类型
    private LocalDate dTime;//上架时间
    private double dPrice;
    private int dNum=0;//数量
    private int dSum=0;//消耗的数量
    private User cook;


    @Override
    public String toString() {
        return "[菜品id："+dId+" 菜品名称："+dame+" 菜品类型"+dType+"数量："+dNum+" 销量:"+dSum+"上架时间:"+dTime+
                "\n供货商:"+cook.username+"]";
    }

    public vegetableList(String dId, String dame, String dType, double dPrice, int dNum,LocalDate dTime) {
        this.dId = dId;
        this.dame = dame;
        this.dType = dType;
        this.dNum = dNum;
        this.dPrice = dPrice;
        this.dTime=dTime;
    }

    public User getCook() {
        return cook;
    }

    public void setCook(User cook) {
        this.cook = cook;
    }

    public int getdSum() {
        return dSum;
    }
    //重写方便管理
    public void setdSum(int dSum) {
        this.dSum  = this.dSum+dSum;

    }

    public String getdId() {
        return dId;
    }

    public void setdId(String dId) {
        this.dId = dId;
    }

    public int getdNum() {
        return dNum;
    }

    public void setdNum(int dNum) {
        this.dNum = dNum;
    }

    public vegetableList() {
    }

    public String getdID() {
        return dId;
    }

    public void setdID(String dId) {
        this.dId = dId;
    }

    public String getDame() {
        return dame;
    }

    public void setDame(String dame) {
        this.dame = dame;
    }

    public String getdType() {
        return dType;
    }

    public void setdType(String dType) {
        this.dType = dType;
    }

    public LocalDate getdTime() {
        return dTime;
    }

    public void setdTime(LocalDate dTime) {
        this.dTime = dTime;
    }

    public double getdPrice() {
        return dPrice;
    }

    public void setdPrice(double dPrice) {
        this.dPrice = dPrice;
    }
}
